package com.zzy.customglide.manager;

import android.annotation.SuppressLint;
import android.app.Fragment;

public class ActivityFragmentManager extends Fragment {
    LifecycleCallBack lifecycleCallBack;
    public ActivityFragmentManager(){

    }
    @SuppressLint("ValidFragment")
    public ActivityFragmentManager(LifecycleCallBack lifecycleCallback) {
        this.lifecycleCallBack = lifecycleCallback;
    }

    @Override
    public void onStart() {
        super.onStart();
        if(lifecycleCallBack!=null){
            lifecycleCallBack.glideStartAction();
        }
    }

    @Override
    public void onStop() {
        super.onStop();
        if(lifecycleCallBack!=null){
            lifecycleCallBack.glideStopAction();
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if(lifecycleCallBack!=null){
            lifecycleCallBack.glideReleaseAction();
        }
    }


}
